CREATE EXTERNAL TABLE jms_dwd.dwd_order_timely_collection_hi(
id                                                                      string  comment '订单id'
,waybill_id                          string  comment '运单号'
,order_source_code                          string  comment '订单来源code'
,order_source_name                          string  comment '订单来源name'
,config_id                          string  comment '配置id'
,sender_province_id                          string  comment '寄件省id'
,sender_province_name                          string  comment '寄件省name'
,sender_city_id                          string  comment '寄件城市id'
,sender_city_name                          string  comment '寄件城市name'
,sender_area_id                          string  comment '寄件区域id'
,sender_area_name                          string  comment '寄件区域name'
,pick_network_code                          string  comment '揽收网点code'
,pick_network_name                          string  comment '揽收网点name'
,franchisees_code                          string  comment '揽收网点加盟商code'
,franchisees_name                          string  comment '揽收网点加盟商name'
,proxy_area_code                          string  comment '揽收网点代理区code'
,proxy_area_name                          string  comment '揽收网点代理区name'
,pick_staff_code                          string  comment '揽收员code'
,pick_staff_name                          string  comment '揽收员name'
,order_source_group_id                          string  comment '订单分类ID'
,order_source_group_name                          string  comment '订单分类name'
,customer_code                          string  comment '客户编号code'
,customer_name                          string  comment '客户编号name'
,input_time                          timestamp  comment '订单录入时间'
,pick_end_time                          timestamp  comment '揽收截止时间'
,pick_time                          timestamp  comment '揽收时间'
,cancel_time                          timestamp  comment '订单取消时间'
,store_send_time                          timestamp  comment '下单时间'
,taking_type                          int  comment '揽收类型1-延误揽收，2-统计前未揽收，0为缺省值-及时揽收'
,plate_flag                          int  comment '0或空值：订单录入时间（取号时间），1：商家点击发货时间'
,order_status_code                          string  comment '订单状态'
,if_tml_collect                           string  comment '是否及时揽收'

    )
COMMENT '订单数据及时揽收打标表'
PARTITIONED BY (
  dt string COMMENT '时间分区-创建时间')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dwd.db/external/dwd_order_timely_collection_hi'